package com.yike.product.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.api.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 平台商品参数
 *
 * @author Sakura
 * @since 2024-10-22
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "平台商品参数")
@ToString(callSuper = true)
public class PlatformGoodsParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "id不能为空", groups = {Update.class})
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("条形码")
    private String code;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("图片地址")
    private String goodsImage;

    @NotNull(message = "商品售价不能为空")
    @ApiModelProperty("商品售价")
    private BigDecimal price;

    @ApiModelProperty("商品进价")
    private BigDecimal buyPrice;

    @ApiModelProperty("备注信息")
    private String remark;

    @ApiModelProperty("分类id")
    private Long categoryId;

    @ApiModelProperty("品牌id")
    private Long brandId;

    @ApiModelProperty("规格id")
    private Long specificationId;

    @ApiModelProperty("单位id")
    private Long unitId;

    @ApiModelProperty("供应商ID")
    private Long supplierId;

    @ApiModelProperty("毛利率（%）")
    private BigDecimal grossMargin;

    @ApiModelProperty("到期时间")
    private String expireTime;

}
